<?php
function skip($url,$pic,$message){

$html=<<<A
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta http-equiv="refresh" content="3;URL={$url}"  />
<title>正在跳转</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<link rel="stylesheet" type="text/css" href="style/remind.css" />
</head>
<body>
<div class="notice" ><span class="glyphicon {$pic}" ></span>  $message    <a href="{$url}">3s后自动跳转！</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></div>
</body>
</html>

A;

echo $html;
exit();
}



function is_login($link){
    if(isset($_COOKIE['hbw']['sid']) && isset($_COOKIE['hbw']['pwd'])){
        $query = "select * from user where sid='{$_COOKIE['hbw']['sid']}' and password='{$_COOKIE['hbw']['pwd']}' ";
        $result = execute($link,$query);
        if(mysqli_num_rows($result)==1){
            $data=mysqli_fetch_assoc($result);
            return $data['sid'];
        }
        else{
           return false;
        }
    }
    else{
             return false;
    }
}



?>